The present invention relates to in-place conversion of a computer disk partition""s file system without archiving or destroying user data, and more particularly to conversion from an xe2x80x9cadvanced file systemxe2x80x9d such as NTFS to a FAT file system.
Storage Media
Computers utilize a wide variety of disks as storage media for user data. Disk technologies currently provide optical disks, magnetic disks, hard disks, floppy disks, and removable disks, and new disk technologies are being actively researched and developed. Indeed, some disks used by computers in the future may be cubical or some other shape rather than flat and circular.
FIG. 1 illustrates a disk 100 attached to a disk drive 102. The disk 100 illustrates physical characteristics of both floppies and hard disks; flash memory, cubical disks or other disks may appear in different configurations than the one shown here. The disk 100 contains a number of concentric data cylinders such as the cylinder 104. The cylinder 104 contains several data sectors, including sectors 106 and 108. The sectors 106 and 108 are located on an upper side 110 of the disk 100; additional sectors may be located on a lower side 112 of the disk 100. The sides 110, 112 of the disk 100 define a platter 114. A hard disk may contain several platters. The upper side 110 of the disk 100 is accessed by a head 116 mounted on an arm 118 secured to the drive 102. Optical or cubical disks may be accessed by other means, such as photoemitters or photoreceptors, and flash memory or other memory disks are accessed by electronic circuits familiar to those of skill in the art.
A given sector on the disk 100 may be identified by specifying a head, a cylinder, and a sector within the cylinder. A triplet specifying the head number, cylinder number, and sector number in this manner is known as a xe2x80x9cphysical sector address.xe2x80x9d Alternatively, a given sector may be identified by a logical sector address, which is a single number rather than a triplet of numbers.
Partitions and File Systems
Many disks mold the available space into one or more partitions by using a partition table located on the disk. A wide variety of partitions are used, and more partition types will no doubt be defined over time. Many partitions reside on a single disk, but some use volume sets, stripe sets, mirror sets, or other approaches to store a single partition""s data on more than one disk. A partial-list of current partitions and their associated file systems is given below; the trademarks listed are the property of their respective owners. This list includes a variety of 12-bit, 16-bit, and 32-bit FAT file systems and numerous other file systems. The list illustrates the benefit of being able to at least identify a variety of partitions to determine what conversion operations, if any, are both pertinent and supported; it does not follow that each and every partition listed should or must be supported in a commercial product or in an embodiment of the invention described and claimed hereafter:
12-bit FAT
16-bit FAT greater than =32 MB, Ext INT 13
16-bit FAT, partition less than 32 MB
16-bit FAT, partition greater than =32 MB
32-bit FAT
32-bit FAT, Ext INT 13
Advanced UNIX
AIX (Linux)
AIX Bootable (Linux)
AIX bootable partition
AIX data partition
Amoeba bad block table
Amoeba file system
AST Windows swap file
BSDI file system or secondary swap
BSDI swap partition or secondary file system
Coherent file system
Coherent swap partition
Commodore DOS
Compaq diagnostics
Concurrent CP/M, Concurrent DOS
CP/M
CP/M 86
CTOS (Convergent Technologies OS)
Cyrnix
Dell partition spannning multiple drives (array)
Disabled NT FAT volume set (Q114841)
Disabled NT IFS volume set (Q114841) (HPFS)
Disk.Secure Multi-Boot
DOS 3.3+second partition
DOS access (Linux)
DR-DOS 6.0 LOGIN.EXE-secured 12-bit FAT partition
DR-DOS 6.0 LOGIN.EXE-secured 16-bit FAT partition
DR-DOS 6.0 LOGIN.EXE-secured Huge partition
Extended partition or Extended volume
Extended partition, Ext INT 13
EZ-Drive 3.05
FreeBSD/386
GNU HURD
GoldenBow VFeature
Hidden 12-bit FAT
Hidden 16-bit FAT greater than =32 MB, Ext INT 13
Hidden 16-bit FAT, partition less than 32 MB
Hidden 16-bit FAT, partition greater than =32 MB
Hidden 32-bit FAT
Hidden 32-bit FAT, Ext INT 13
Hidden IFS
Installable file system: HPFS, NTFS
LANstep
Linux native file system (ext2fs/xiafs)
Linux Swap partition
Linux/Minix v1.4b+
Mach, MtXinu BSD 4.3 on Mach
Microport System V/386
Minix v1.1-1.4a
Mitac Advanced Disk Manager
Mylex DCE376 EISA SCSI controller, past 1024th cyl
NEC MS-DOS 3.x
NextStep Partition
Novell Netware
Novell Netware (3.11 and 4.1)
Novell Netware 286
Novell Netware 386
NT FAT volume set (Q114841)
NT IFS volume set (Q114841) (HPFS)
Old MINIX (Linux)
Ontrack Disk Manager 6.0 (DDO)
Ontrack Disk Manager, read/write
Ontrack Disk Manager, read-only
Ontrack Disk Manager, write-only
OPUS
OS/2
OS/2 Boot Manager
OS/2 hiding type 04h partition
PC/IX
Personal RISC Boot
Priam EDISK
Prime
QNX
Save to Disk Partition
Secure File System
SpeedStor
SpeedStor 12-bit FAT extended partition
SpeedStor 16-bit FAT extended partition
SpeedStor Dimensions
SpeedStor Storage Dimensions
SplitDrive
Syrinx
UNIX SysV/386, 386/ix
VENIX 80286
XENIX /usr file system
Xenix bad-block table
XENIX root file system
A file system of particular interest here is the NT File System (xe2x80x9cNTFSxe2x80x9d). Discussions of NTFS are provided in xe2x80x9cInside the Windows NT File Systemxe2x80x9d, by Helen Custer, ISBN 1-55615-660-X, as well as in marketing and technical materials available in hard copy and on the Internet from Microsoft Corporation and other sources. Those of skill in the art will note that these discussions sometimes involve unimplemented specifications or mere speculations.
NTFS contains advanced file system features which make it more complex or difficult to manipulate NTFS partitions than it is to manipulate partitions organized by many existing FAT file systems. More precisely, NTFS combines features such as the use of a database paradigm to support indexing of file attributes; multiple data streams per file; blurring of the distinction between system and user areas; recoverability by use of a log; recoverability by use of transactions; support for large disks; security descriptors constraining access to file objects; Unicode names; support for POSIX features such as links; bad cluster remapping; caching support; virtual memory support; system structure compression; balanced tree directory structures; support for volume spanning, volume sets, stripe sets, mirror sets, and other features which divide a file system""s contents between disks or partitions; and/or a relocatable system area. xe2x80x9cAttributesxe2x80x9d are also known as xe2x80x9cdata streamsxe2x80x9d; some advanced file systems allow a single file to hold multiple data streams.
One partition table composition, denoted herein as the xe2x80x9cIBM-compatiblexe2x80x9d partition table, is found on the disks used in many IBM(copyright) personal computers and IBM-compatible computers (IBM is a registered trademark of International Business Machines Corporation). In recent years, IBM-compatible computers are sometimes referred to PC-compatible, as computers having an Intel architecture, or even as xe2x80x9cWintelxe2x80x9d computers. The term xe2x80x9cIBM-compatiblexe2x80x9d refers nominally to IBM, which was the original source of such computers. However, the items of interest for understanding the present invention are not so much the computer vendor, the processor architecture, or the operating system involved, as they are the partition table and the file systems involved. References to IBM-compatible partition tables herein should be understood accordingly. IBM-compatible partition tables may be used on a wide variety of disks, with a variety of partition and file system types, in a variety of ways. In particular, the partition table format may be changed without necessarily changing file system formats, and vice versa.
As shown in FIG. 2, one version of an IBM-compatible partition table 200 includes an Initial Program Loader (xe2x80x9cIPLxe2x80x9d) identifier 202, four primary partition identifiers 204, and a boot identifier 206. As shown in FIG. 3, each partition identifier 204 includes a boot indicator 300 to indicate whether the partition in question is bootable. At most one of the partitions in the set of partitions defined by the partition table 200 is bootable at any given time but xe2x80x9cboot managementxe2x80x9d tools are commercially available to facilitate booting from different partitions.
Each partition identifier 204 also includes a starting address 302, which is the physical sector address of the first sector in the partition in question, and an ending address 304, which is the physical sector address of the last sector in the partition. A sector count 306 holds the total number of disk sectors in the partition. A boot sector address 308 holds the logical sector address corresponding to the physical starting address 302. Additional partition information may be stored in a disk administrator utility or other location outside the partition table, or in an enhanced partition table, particularly when partitions are allowed to span disks.
Many IBM-compatible computer systems allow xe2x80x9clogical partitionsxe2x80x9d as well as the primary partitions just described. All logical partitions are contained within one primary partition; a primary partition which contains logical partitions is also known as an xe2x80x9cextended partition.xe2x80x9d
Each partition identifier 204 also includes a system indicator 310. The system indicator 310 identifies the type of file system contained in the partition, which in turn defines the physical arrangement of data that is stored in the partition on the disk 100 (FIG. 1). For instance, the system indicator may indicate that data is organized in the partition according to some version of NTFS, with multiple data streams, a relocatable system area, and/or other features noted above. System indicator values not recognized by a particular operating system are treated as designating an unknown file system.
The file system associated with a specific partition of the disk 100 determines the format in which data is stored in the partition, namely, the physical arrangement of user data and of file system structures in the portion of the disk 100 that is delimited by the starting address 302 and the ending address 304 of the partition in question.
An operating system manages access, not only to the disk 100, but to other computer resources as well. Resources typically managed by the operating system include one or more disks and disk drives, memory (RAM and/or ROM), micro-processors, and I/O devices such as a keyboard, mouse, screen, printer, tape drive, modem, serial port, parallel port, or network port.
File System Conversion
It is sometimes desirable to alter the contents of a partition in-place without copying all necessary user and system data off the disk to a temporary storage location such as a tape or another disk and using FDISK or a similar tool. Inventions for in-place partition manipulation without destroying user data are described in U.S. Pat. Nos. 5,675,769, 5,706,472, and 5,930,831, and in U.S. patent application Ser. No. 08/932,530. Software embodying such inventions is commercially available from PowerQuest Corporation of Orem, Utah. However, these patent documents do not teach comprehensive methods for converting in-place from an advanced file system such as NTFS, to a simpler file system such as one of the various FAT file systems.
Microsoft Windows 95b and Windows 98 products apparently include functionality to convert a FAT-16 partition to a FAT-32 partition in-place and without requiring an auxiliary storage medium or destroying user data. Likewise, Microsoft""s Windows NT product apparently includes functionality to convert a FAT-16 partition to an NTFS partition in-place and without requiring an auxiliary storage medium or destroying user data, and Microsoft""s Windows 2000 product apparently includes functionality to convert a FAT-16 or a FAT-32 partition to an NTFS partition in-place and without requiring an auxiliary storage medium or destroying user data. Microsoft provides a CONVERT utility to perform these file system conversions.
Because the NTFS device driver is so complex and because the software used to install Microsoft Windows NT does not manage large amounts of memory, Windows NT cannot be installed onto an NTFS partition directly. When a user selects installation onto an NTFS partition, the install program creates a FAT partition and installs Windows NT to it. It then uses NT""s boot-time program launcher to run the CONVERT program from within Windows NT. This program converts the FAT partition to an NTFS partition. In addition, sophisticated users can run Windows NT""s CONVERT utility directly to produce NTFS partitions from FAT partitions.
Technology is also apparently known for converting FAT-16 to HPFS (High Performance File System). Technology may possibly be known for converting FAT-16 or HPFS to IBM""s AFS format.
However, the aforementioned patents and other items do not enable satisfactory methods for converting NTFS partitions into FAT partitions. They do not adequately teach tools and techniques for preserving user data while modifying or creating FAT system data from the NTFS system data previously employed within the partition, and doing so without requiring use of an alternate storage medium. They do not permit file system conversion of commonly encountered NTFS file system instances from NTFS to FAT without necessarily backing up the data from the NTFS partition, reformatting the NTFS partition to create a new empty FAT partition, and then restoring the data to the new FAT partition.
Microsoft""s conversion technology apparently checks for available space, builds system structures in free space of the existing file system, and then effects conversion by switching boot records. It apparently does not vacate space by moving clusters to make room for the new file system""s structures if that is necessary. Moreover, it is apparently a one-way road, in the sense that while it converts between FAT file systems, or from a FAT file system to a more complex NTFS file system, it cannot convert an NTFS file system back to FAT.
A conventional approach using XCOPY or another data copy utility is also unsatisfactory. Such an approach requires copying all desired user data (that is, all of the data one wishes to find in the resulting FAT partition) from the NTFS partition to a designated FAT partition elsewhere on the computer""s disk subsystem or on a tape, for instance, and then deleting the source NTFS partition. This copy operation can be very time consuming, and it requires enough free space to hold a duplicate of the user data.
Conversion from a simpler file system, such as a FAT file system, to a more complex or advanced file system, such as NTFS or HPFS or AFS, is relatively straight-forward because one starts with source file system whose features are a subset or special case of the target file system""s features. By contrast, converting from a more advanced file system to a simpler file systemxe2x80x94and doing so in-place, safely, and efficientlyxe2x80x94requires new tools and techniques.
Thus, it would be an advancement in the art to provide improved tools and techniques for file system conversion, such as systems and methods for converting NTFS partitions to FAT format in-place without destroying user data.
Such tools and techniques are disclosed and claimed herein.
The present invention provides methods, articles, and systems for safely and efficiently converting advanced file systems in-place to simpler file systems. In particular, and without limitation, the invention can be used to convert NTFS partitions or Linux ext2fs to FAT partitions with little or no user data movement and without a substantial risk of unintentionally losing user data.
One inventive method for converting an advanced file system to a simpler file system in-place while preserving user data comprises checking for sufficient space to hold file system structures of the simpler file system; creating file system structures of the simpler file system using data values from file system structures of the advanced file system; and updating file system identification information to identify the simpler file system to an operating system rather than identifying the advanced file system to the operating system.
In some situations, the creating step creates file system structures of the simpler file system in part of a partitionable storage medium that is treated by the advanced file system as free space, while in others the advanced file system structures are partially or entirely overwritten. In some cases, the method further comprises vacating space, and the creating step creates file system structures of the simpler file system at least partially in such vacated space.
The method, or other inventive embodiments such as configured CDs or systems, may delete one or more advanced file system features, with or without user permission or notice, such that the simpler file system produced by the method lacks a feature corresponding to the deleted feature. Thus, features such as the following may be deleted: NTFS indexes, NTFS named data streams, NTFS prior file versions, file access control lists, file storage quotas, symbolic links, and other features.
In addition to deleting certain features in a given situation, the invention creates a simpler (FAT) file system which includes features corresponding to the NTFS or other advanced file system. For instance, if the advanced file system includes a file that has a short file name and lacks a long file name, the invention may create a FAT long file name corresponding to the short file name. Likewise, if the advanced file system includes a first volume label that contains more than eleven characters, the invention may create from the first volume label a FAT volume label of no more than eleven characters.
User data in files is generally carried over during conversion so that it appears in the FAT file system unless the user expressly deletes it or authorizes deletion. However, user data in additional versions of a file or in additional data streams of a file may be deleted by default in some embodiments of the invention.
The invention is not limited to situations in which conversion to a FAT file system is completed. The invention also includes systems, configured media, and methods for attempting conversion of an advanced file system to a simpler file system. For instance, some inventive methods comprise checking for at least one preventive condition in the advanced file system that prevents an implementing program from completing a file system conversion from the advanced file system to the simpler file system; discontinuing an attempted file system conversion by the implementing program without completing the file system conversion if such a preventive condition is found; and completing the file system conversion if no such preventive condition is found. Completing the conversion comprises creating file system structures of the simpler file system using data values from file system structures of the advanced file system and updating file system identification information to identify the simpler file system to an operating system rather than identifying the advanced file system to the operating system.
The condition checking step checks for one or more of the following preventive conditions: a lack of sufficient space to hold file system structures of the simpler file system; files compressed by a file system driver; sparse files; a file with more than one short name and one long name, both in the same directory; clusters which are at least sixty-four kilobytes in size; a file which is larger than four gigabytes in size; a bad cluster at a location that would be used by a file system structure of the simpler file system.
Inventive systems include at least one computer having a processor in operable connection with a memory, and a partitionable storage medium having at least one partition. The partition is identified by file system identification information such as a partition table system indicator. The partition contains an advanced file system which is accessible for manipulation by use of the processor. The system is configured to perform a method to at least attempt conversion of an advanced file system to a simpler file system: checking for at least one preventive condition in the advanced file system that prevents completion of a file system conversion from the advanced file system to the simpler file system; discontinuing an attempted file system conversion without completing it if such a preventive condition is found; and completing the file system conversion if no such preventive condition is found.
Other system embodiments include at least two computers, each having at least a memory, a processor, and I/O devices. The computers are connected by a network for communication. The system includes a means for deleting at least one predetermined advanced file system feature from a selected partition on one of the computers without user feedback, and a means for deleting at least one other predetermined advanced file system feature from the selected partition after user feedback agreeing to the deletion.
The invention permits users to restore FAT file systems that have been converted to NTFS or another advanced file system, without backing up all data to tape or another drive and then reformatting the partition. Leaving the user data mostly or entirely in place makes the conversion faster and more efficient. Other features and advantages of the present invention will become more fully apparent through the following description.